While computer vision remains a complex problem in artificial intelligence, recent achievements such as the recursive cortical network (RCN) have enabled computers to identify objects from visual data efficiently and with high accuracy. However, just as with human vision, object recognition is only a part of the skillset needed to effectively interact with an environment. Humans may observe how objects interact with each other to infer properties of those objects; for example, by observing how a sphere reacts when dropped onto a hard surface, a human may be able to infer whether a ball is made of rubber, cork, or steel. Often, this observation occurs as a result of direct interaction with the environment; e.g., a human intentionally drops a ball onto a hard surface (or squeezes the ball, etc.) as an alternative to passively waiting for the environment to produce such a situation naturally. This knowledge makes it easier to accurately interpret past events, and likewise, to predict future events. Unfortunately, traditional approaches to computer vision more often embody the approach of the passive observer, which restricts their ability to achieve comprehension of an environment in a complete and generalizable sense. Thus, there is a need in the artificial intelligence field to create new and useful methods for establishing and utilizing sensorimotor programs. This invention provides such new and useful methods.